GtkCellRenderer *cell,
gboolean expand)
{
+ GtkCellLayoutIface *iface;
+ GtkCellArea *area;
+
g_return_if_fail (GTK_IS_CELL_LAYOUT (cell_layout));
g_return_if_fail (GTK_IS_CELL_RENDERER (cell));
- (* GTK_CELL_LAYOUT_GET_IFACE (cell_layout)->pack_start) (cell_layout,
- cell,
- expand);
+ iface = GTK_CELL_LAYOUT_GET_IFACE (cell_layout);
+
+ if (iface->pack_start)
+ iface->pack_start (cell_layout, cell, expand);
+ else
+ {
+ area = iface->get_area (cell_layout);
+
+ if (area)
+ gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (area), cell, expand);
+ }
}
/**
GtkCellRenderer *cell,
gboolean expand)
{
+ GtkCellLayoutIface *iface;
+ GtkCellArea *area;
+
g_return_if_fail (GTK_IS_CELL_LAYOUT (cell_layout));
g_return_if_fail (GTK_IS_CELL_RENDERER (cell));
- (* GTK_CELL_LAYOUT_GET_IFACE (cell_layout)->pack_end) (cell_layout,
- cell,
- expand);
+ iface = GTK_CELL_LAYOUT_GET_IFACE (cell_layout);
+
+ if (iface->pack_end)
+ iface->pack_end (cell_layout, cell, expand);
+ else
+ {
+ area = iface->get_area (cell_layout);
+
+ if (area)
+ gtk_cell_layout_pack_end (GTK_CELL_LAYOUT (area), cell, expand);
+ }
}
/**
void
gtk_cell_layout_clear (GtkCellLayout *cell_layout)
{
+ GtkCellLayoutIface *iface;
+ GtkCellArea *area;
+
g_return_if_fail (GTK_IS_CELL_LAYOUT (cell_layout));
- (* GTK_CELL_LAYOUT_GET_IFACE (cell_layout)->clear) (cell_layout);
+ iface = GTK_CELL_LAYOUT_GET_IFACE (cell_layout);
+
+ if (iface->clear)
+ iface->clear (cell_layout);
+ else
+ {
+ area = iface->get_area (cell_layout);
+
+ if (area)
+ gtk_cell_layout_clear (GTK_CELL_LAYOUT (area));
+ }
}
static void
gchar *attribute;
gint column;
GtkCellLayoutIface *iface;
+ GtkCellArea *area;
attribute = va_arg (args, gchar *);
iface = GTK_CELL_LAYOUT_GET_IFACE (cell_layout);
- (* iface->clear_attributes) (cell_layout, cell);
+ if (iface->get_area)
+ area = iface->get_area (cell_layout);
+
+ if (iface->clear_attributes)
+ iface->clear_attributes (cell_layout, cell);
+ else if (area)
+ gtk_cell_layout_clear_attributes (GTK_CELL_LAYOUT (area), cell);
while (attribute != NULL)
{
column = va_arg (args, gint);
- (* iface->add_attribute) (cell_layout, cell, attribute, column);
+ if (iface->add_attribute)
+ iface->add_attribute (cell_layout, cell, attribute, column);
+ else if (area)
+ gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (area), cell, attribute, column);
+
attribute = va_arg (args, gchar *);
}
}
const gchar *attribute,
gint column)
{
+ GtkCellLayoutIface *iface;
+ GtkCellArea *area;
+
g_return_if_fail (GTK_IS_CELL_LAYOUT (cell_layout));
g_return_if_fail (GTK_IS_CELL_RENDERER (cell));
g_return_if_fail (attribute != NULL);
g_return_if_fail (column >= 0);
- (* GTK_CELL_LAYOUT_GET_IFACE (cell_layout)->add_attribute) (cell_layout,
- cell,
- attribute,
- column);
+ iface = GTK_CELL_LAYOUT_GET_IFACE (cell_layout);
+
+ if (iface->add_attribute)
+ iface->add_attribute (cell_layout,
+ cell,
+ attribute,
+ column);
+ else
+ {
+ area = iface->get_area (cell_layout);
+
+ if (area)
+ gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (area), cell, attribute, column);
+ }
}
/**
gpointer func_data,
GDestroyNotify destroy)
{
+ GtkCellLayoutIface *iface;
+ GtkCellArea *area;
+
g_return_if_fail (GTK_IS_CELL_LAYOUT (cell_layout));
g_return_if_fail (GTK_IS_CELL_RENDERER (cell));
- (* GTK_CELL_LAYOUT_GET_IFACE (cell_layout)->set_cell_data_func) (cell_layout,
- cell,
- func,
- func_data,
- destroy);
+ iface = GTK_CELL_LAYOUT_GET_IFACE (cell_layout);
+
+ if (iface->set_cell_data_func)
+ iface->set_cell_data_func (cell_layout,
+ cell,
+ func,
+ func_data,
+ destroy);
+ else
+ {
+ area = iface->get_area (cell_layout);
+
+ if (area)
+ gtk_cell_layout_set_cell_data_func (GTK_CELL_LAYOUT (area), cell, func, func_data, destroy);
+ }
}
/**
gtk_cell_layout_clear_attributes (GtkCellLayout *cell_layout,
GtkCellRenderer *cell)
{
+ GtkCellLayoutIface *iface;
+ GtkCellArea *area;
+
g_return_if_fail (GTK_IS_CELL_LAYOUT (cell_layout));
g_return_if_fail (GTK_IS_CELL_RENDERER (cell));
- (* GTK_CELL_LAYOUT_GET_IFACE (cell_layout)->clear_attributes) (cell_layout,
- cell);
+ iface = GTK_CELL_LAYOUT_GET_IFACE (cell_layout);
+
+ if (iface->clear_attributes)
+ iface->clear_attributes (cell_layout, cell);
+ else
+ {
+ area = iface->get_area (cell_layout);
+
+ if (area)
+ gtk_cell_layout_clear_attributes (GTK_CELL_LAYOUT (area), cell);
+ }
}
/**
GtkCellRenderer *cell,
gint position)
{
+ GtkCellLayoutIface *iface;
+ GtkCellArea *area;
+
g_return_if_fail (GTK_IS_CELL_LAYOUT (cell_layout));
g_return_if_fail (GTK_IS_CELL_RENDERER (cell));
- (* GTK_CELL_LAYOUT_GET_IFACE (cell_layout)->reorder) (cell_layout,
- cell,
- position);
+ iface = GTK_CELL_LAYOUT_GET_IFACE (cell_layout);
+
+ if (iface->reorder)
+ iface->reorder (cell_layout, cell, position);
+ else
+ {
+ area = iface->get_area (cell_layout);
+
+ if (area)
+ gtk_cell_layout_reorder (GTK_CELL_LAYOUT (area), cell, position);
+ }
}
/**
gtk_cell_layout_get_cells (GtkCellLayout *cell_layout)
{
GtkCellLayoutIface *iface;
+ GtkCellArea *area;
g_return_val_if_fail (GTK_IS_CELL_LAYOUT (cell_layout), NULL);
iface = GTK_CELL_LAYOUT_GET_IFACE (cell_layout);
if (iface->get_cells)
return iface->get_cells (cell_layout);
+ else
+ {
+ area = iface->get_area (cell_layout);
+
+ if (area)
+ return gtk_cell_layout_get_cells (GTK_CELL_LAYOUT (area));
+ }
return NULL;
}